package com.qkl.xiatang.app.dto.upload;

import com.qkl.xiatang.app.dto.PageInDTO;
import com.qkl.xiatang.app.utils.AppUtils;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

@Data
public class CommonQueryInDTO extends PageInDTO {

    public static final int TYPE_BREED = 1;

    private String startDate;

    private String endDate;

    private String sign;

    /**
     *  0 顺序，1 倒序，默认为 倒序
     */
    private Integer sort;

    /**
     * 类型: 1 养殖视频
     */
    private List<Integer> typeList;

    private List<Integer> typeSubList;

    @Override
    public void checkParam() {
        super.checkParam();

        startDate = StringUtils.trimToEmpty(startDate);
        endDate = StringUtils.trimToEmpty(endDate);
        //sort = StringUtils.trimToEmpty(sort);
        startDate = AppUtils.toYYYY_MM_DD(startDate);
        endDate = AppUtils.toYYYY_MM_DD(endDate);
    }
}
